import java.util.Scanner;

public class test3 {


    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        while (true) {
            System.out.println("请输入年份,-1退出");
            String str = scan.next();
            if (str.equals("-1")) {
                break;
            }
            String stryear = str.substring(0, 4);
            String strmonth = str.substring(5, 7);

            int year = Integer.parseInt(stryear);
            int month = Integer.parseInt(strmonth);



        }
    }
}
